#include <iostream>
#include <string>

using namespace std;
class Employee {
public:
	string name;
	double salary;
	virtual void pay() = 0;
};

class Technician: public Employee {
public:
	virtual void pay(){
		cout << "兼职技术人员按每小时 100 元领取月薪" << endl;
	}
};

class Manager: virtual public Employee {
public:
	Manager(){
		this->salary = 7000;
	}
	virtual void pay(){
		cout << "经理拿固定薪水7000元" << endl;
	}
};

class Salesman: virtual public Employee {
public:
	virtual void pay(){
		cout << "销售人员按当月销售额的 5%拿提成" << endl;
	}
};

class SalesManager: public Manager,public Salesman {
public:
	SalesManager(){
		this->salary = 4000;
	}
	
	virtual void pay() {
		cout << "销售经理既拿月固定工资也领取销售提成，月固定工资为 4000 元，销售提成为所管辖部门当月销售额的 5‰（千分之五）" << endl;
	}
};

int main(int argc, char *argv[]) {
	Employee* p;
	p = new Manager();
	p->pay();
	
	p = new Salesman();
	p->pay();
	
	p = new Technician();
	p->pay();
	
	p = new SalesManager();
	p->pay();
}